package com.learn.builder.normal;

import com.learn.builder.base.*;

/**
 * <p>项目名称: design-pattern </p>
 *
 * <p>文件名称: HumanBuilder </p>
 *
 * implement of Human Builder
 */
public class HumanBuilder implements HumanBuild {
    private Human human;

    public HumanBuilder() {
        human = new Human();
    }

    @Override
    public void buildHead(Head head) {
        human.setHead(head);
    }

    @Override
    public void buildBody(Body body) {
        human.setBody(body);
    }

    @Override
    public void buildHand(Hand hand) {
        human.setHand(hand);
    }

    @Override
    public void buildFoot(Foot foot) {
        human.setFoot(foot);
    }

    @Override
    public Human createHuman() {
        return human;
    }
}
